<test>
  <sql>SELECT	COUNT(o.OrderID) AS [COUNT],
		AVG(o.OrderID) AS [AVG],
		FIRST(o.OrderID) AS [FIRST],
		LAST(o.OrderID) AS [LAST],
		CONCAT(o.OrderID) AS [CONCAT],
		MAX(o.OrderID) AS [MAX],
		MIN(o.OrderID) AS [MIN],
		SUM(o.OrderID) AS [SUM],
		STDEV(o.OrderID) AS [STDEV],
		VAR(o.OrderID) AS [VAR]
FROM	Orders o</sql>
  <expectedResults>
    <NewDataSet>
  <xs:schema id="NewDataSet" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
    <xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true">
      <xs:complexType>
        <xs:choice minOccurs="0" maxOccurs="unbounded">
          <xs:element name="Table1">
            <xs:complexType>
              <xs:sequence>
                <xs:element name="COUNT" type="xs:int" minOccurs="0" />
                <xs:element name="AVG" type="xs:int" minOccurs="0" />
                <xs:element name="FIRST" type="xs:int" minOccurs="0" />
                <xs:element name="LAST" type="xs:int" minOccurs="0" />
                <xs:element name="CONCAT" type="xs:string" minOccurs="0" />
                <xs:element name="MAX" type="xs:int" minOccurs="0" />
                <xs:element name="MIN" type="xs:int" minOccurs="0" />
                <xs:element name="SUM" type="xs:int" minOccurs="0" />
                <xs:element name="STDEV" type="xs:double" minOccurs="0" />
                <xs:element name="VAR" type="xs:decimal" minOccurs="0" />
              </xs:sequence>
            </xs:complexType>
          </xs:element>
        </xs:choice>
      </xs:complexType>
    </xs:element>
  </xs:schema>
  <Table1>
    <COUNT>830</COUNT>
    <AVG>10662</AVG>
    <FIRST>10248</FIRST>
    <LAST>11077</LAST>
    <CONCAT>10248, 10249, 10250, 10251, 10252, 10253, 10254, 10255, 10256, 10257, 10258, 10259, 10260, 10261, 10262, 10263, 10264, 10265, 10266, 10267, 10268, 10269, 10270, 10271, 10272, 10273, 10274, 10275, 10276, 10277, 10278, 10279, 10280, 10281, 10282, 10283, 10284, 10285, 10286, 10287, 10288, 10289, 10290, 10291, 10292, 10293, 10294, 10295, 10296, 10297, 10298, 10299, 10300, 10301, 10302, 10303, 10304, 10305, 10306, 10307, 10308, 10309, 10310, 10311, 10312, 10313, 10314, 10315, 10316, 10317, 10318, 10319, 10320, 10321, 10322, 10323, 10324, 10325, 10326, 10327, 10328, 10329, 10330, 10331, 10332, 10333, 10334, 10335, 10336, 10337, 10338, 10339, 10340, 10341, 10342, 10343, 10344, 10345, 10346, 10347, 10348, 10349, 10350, 10351, 10352, 10353, 10354, 10355, 10356, 10357, 10358, 10359, 10360, 10361, 10362, 10363, 10364, 10365, 10366, 10367, 10368, 10369, 10370, 10371, 10372, 10373, 10374, 10375, 10376, 10377, 10378, 10379, 10380, 10381, 10382, 10383, 10384, 10385, 10386, 10387, 10388, 10389, 10390, 10391, 10392, 10393, 10394, 10395, 10396, 10397, 10398, 10399, 10400, 10401, 10402, 10403, 10404, 10405, 10406, 10407, 10408, 10409, 10410, 10411, 10412, 10413, 10414, 10415, 10416, 10417, 10418, 10419, 10420, 10421, 10422, 10423, 10424, 10425, 10426, 10427, 10428, 10429, 10430, 10431, 10432, 10433, 10434, 10435, 10436, 10437, 10438, 10439, 10440, 10441, 10442, 10443, 10444, 10445, 10446, 10447, 10448, 10449, 10450, 10451, 10452, 10453, 10454, 10455, 10456, 10457, 10458, 10459, 10460, 10461, 10462, 10463, 10464, 10465, 10466, 10467, 10468, 10469, 10470, 10471, 10472, 10473, 10474, 10475, 10476, 10477, 10478, 10479, 10480, 10481, 10482, 10483, 10484, 10485, 10486, 10487, 10488, 10489, 10490, 10491, 10492, 10493, 10494, 10495, 10496, 10497, 10498, 10499, 10500, 10501, 10502, 10503, 10504, 10505, 10506, 10507, 10508, 10509, 10510, 10511, 10512, 10513, 10514, 10515, 10516, 10517, 10518, 10519, 10520, 10521, 10522, 10523, 10524, 10525, 10526, 10527, 10528, 10529, 10530, 10531, 10532, 10533, 10534, 10535, 10536, 10537, 10538, 10539, 10540, 10541, 10542, 10543, 10544, 10545, 10546, 10547, 10548, 10549, 10550, 10551, 10552, 10553, 10554, 10555, 10556, 10557, 10558, 10559, 10560, 10561, 10562, 10563, 10564, 10565, 10566, 10567, 10568, 10569, 10570, 10571, 10572, 10573, 10574, 10575, 10576, 10577, 10578, 10579, 10580, 10581, 10582, 10583, 10584, 10585, 10586, 10587, 10588, 10589, 10590, 10591, 10592, 10593, 10594, 10595, 10596, 10597, 10598, 10599, 10600, 10601, 10602, 10603, 10604, 10605, 10606, 10607, 10608, 10609, 10610, 10611, 10612, 10613, 10614, 10615, 10616, 10617, 10618, 10619, 10620, 10621, 10622, 10623, 10624, 10625, 10626, 10627, 10628, 10629, 10630, 10631, 10632, 10633, 10634, 10635, 10636, 10637, 10638, 10639, 10640, 10641, 10642, 10643, 10644, 10645, 10646, 10647, 10648, 10649, 10650, 10651, 10652, 10653, 10654, 10655, 10656, 10657, 10658, 10659, 10660, 10661, 10662, 10663, 10664, 10665, 10666, 10667, 10668, 10669, 10670, 10671, 10672, 10673, 10674, 10675, 10676, 10677, 10678, 10679, 10680, 10681, 10682, 10683, 10684, 10685, 10686, 10687, 10688, 10689, 10690, 10691, 10692, 10693, 10694, 10695, 10696, 10697, 10698, 10699, 10700, 10701, 10702, 10703, 10704, 10705, 10706, 10707, 10708, 10709, 10710, 10711, 10712, 10713, 10714, 10715, 10716, 10717, 10718, 10719, 10720, 10721, 10722, 10723, 10724, 10725, 10726, 10727, 10728, 10729, 10730, 10731, 10732, 10733, 10734, 10735, 10736, 10737, 10738, 10739, 10740, 10741, 10742, 10743, 10744, 10745, 10746, 10747, 10748, 10749, 10750, 10751, 10752, 10753, 10754, 10755, 10756, 10757, 10758, 10759, 10760, 10761, 10762, 10763, 10764, 10765, 10766, 10767, 10768, 10769, 10770, 10771, 10772, 10773, 10774, 10775, 10776, 10777, 10778, 10779, 10780, 10781, 10782, 10783, 10784, 10785, 10786, 10787, 10788, 10789, 10790, 10791, 10792, 10793, 10794, 10795, 10796, 10797, 10798, 10799, 10800, 10801, 10802, 10803, 10804, 10805, 10806, 10807, 10808, 10809, 10810, 10811, 10812, 10813, 10814, 10815, 10816, 10817, 10818, 10819, 10820, 10821, 10822, 10823, 10824, 10825, 10826, 10827, 10828, 10829, 10830, 10831, 10832, 10833, 10834, 10835, 10836, 10837, 10838, 10839, 10840, 10841, 10842, 10843, 10844, 10845, 10846, 10847, 10848, 10849, 10850, 10851, 10852, 10853, 10854, 10855, 10856, 10857, 10858, 10859, 10860, 10861, 10862, 10863, 10864, 10865, 10866, 10867, 10868, 10869, 10870, 10871, 10872, 10873, 10874, 10875, 10876, 10877, 10878, 10879, 10880, 10881, 10882, 10883, 10884, 10885, 10886, 10887, 10888, 10889, 10890, 10891, 10892, 10893, 10894, 10895, 10896, 10897, 10898, 10899, 10900, 10901, 10902, 10903, 10904, 10905, 10906, 10907, 10908, 10909, 10910, 10911, 10912, 10913, 10914, 10915, 10916, 10917, 10918, 10919, 10920, 10921, 10922, 10923, 10924, 10925, 10926, 10927, 10928, 10929, 10930, 10931, 10932, 10933, 10934, 10935, 10936, 10937, 10938, 10939, 10940, 10941, 10942, 10943, 10944, 10945, 10946, 10947, 10948, 10949, 10950, 10951, 10952, 10953, 10954, 10955, 10956, 10957, 10958, 10959, 10960, 10961, 10962, 10963, 10964, 10965, 10966, 10967, 10968, 10969, 10970, 10971, 10972, 10973, 10974, 10975, 10976, 10977, 10978, 10979, 10980, 10981, 10982, 10983, 10984, 10985, 10986, 10987, 10988, 10989, 10990, 10991, 10992, 10993, 10994, 10995, 10996, 10997, 10998, 10999, 11000, 11001, 11002, 11003, 11004, 11005, 11006, 11007, 11008, 11009, 11010, 11011, 11012, 11013, 11014, 11015, 11016, 11017, 11018, 11019, 11020, 11021, 11022, 11023, 11024, 11025, 11026, 11027, 11028, 11029, 11030, 11031, 11032, 11033, 11034, 11035, 11036, 11037, 11038, 11039, 11040, 11041, 11042, 11043, 11044, 11045, 11046, 11047, 11048, 11049, 11050, 11051, 11052, 11053, 11054, 11055, 11056, 11057, 11058, 11059, 11060, 11061, 11062, 11063, 11064, 11065, 11066, 11067, 11068, 11069, 11070, 11071, 11072, 11073, 11074, 11075, 11076, 11077</CONCAT>
    <MAX>11077</MAX>
    <MIN>10248</MIN>
    <SUM>8849875</SUM>
    <STDEV>239.7446558319914</STDEV>
    <VAR>57477.50</VAR>
  </Table1>
</NewDataSet>
  </expectedResults>
  <expectedPlan>
    <executionPlan>
      <element operator="Select">
        <properties>
          <property name="Output List.[00]" value="Expr1001 AS COUNT" />
          <property name="Output List.[00].Column" value="Expr1001" />
          <property name="Output List.[00].DataType" value="Int32" />
          <property name="Output List.[00].Output Name" value="COUNT" />
          <property name="Output List.[01]" value="Expr1002 AS AVG" />
          <property name="Output List.[01].Column" value="Expr1002" />
          <property name="Output List.[01].DataType" value="Int32" />
          <property name="Output List.[01].Output Name" value="AVG" />
          <property name="Output List.[02]" value="Expr1003 AS FIRST" />
          <property name="Output List.[02].Column" value="Expr1003" />
          <property name="Output List.[02].DataType" value="Int32" />
          <property name="Output List.[02].Output Name" value="FIRST" />
          <property name="Output List.[03]" value="Expr1004 AS LAST" />
          <property name="Output List.[03].Column" value="Expr1004" />
          <property name="Output List.[03].DataType" value="Int32" />
          <property name="Output List.[03].Output Name" value="LAST" />
          <property name="Output List.[04]" value="Expr1005 AS CONCAT" />
          <property name="Output List.[04].Column" value="Expr1005" />
          <property name="Output List.[04].DataType" value="String" />
          <property name="Output List.[04].Output Name" value="CONCAT" />
          <property name="Output List.[05]" value="Expr1006 AS MAX" />
          <property name="Output List.[05].Column" value="Expr1006" />
          <property name="Output List.[05].DataType" value="Int32" />
          <property name="Output List.[05].Output Name" value="MAX" />
          <property name="Output List.[06]" value="Expr1007 AS MIN" />
          <property name="Output List.[06].Column" value="Expr1007" />
          <property name="Output List.[06].DataType" value="Int32" />
          <property name="Output List.[06].Output Name" value="MIN" />
          <property name="Output List.[07]" value="Expr1008 AS SUM" />
          <property name="Output List.[07].Column" value="Expr1008" />
          <property name="Output List.[07].DataType" value="Int32" />
          <property name="Output List.[07].Output Name" value="SUM" />
          <property name="Output List.[08]" value="Expr1009 AS STDEV" />
          <property name="Output List.[08].Column" value="Expr1009" />
          <property name="Output List.[08].DataType" value="Double" />
          <property name="Output List.[08].Output Name" value="STDEV" />
          <property name="Output List.[09]" value="Expr1010 AS VAR" />
          <property name="Output List.[09].Column" value="Expr1010" />
          <property name="Output List.[09].DataType" value="Decimal" />
          <property name="Output List.[09].Output Name" value="VAR" />
        </properties>
        <input>
          <element operator="StreamAggregate">
            <properties>
              <property name="Output List.[00]" value="Expr1001" />
              <property name="Output List.[00].Column" value="Expr1001" />
              <property name="Output List.[00].DataType" value="Int32" />
              <property name="Output List.[01]" value="Expr1002" />
              <property name="Output List.[01].Column" value="Expr1002" />
              <property name="Output List.[01].DataType" value="Int32" />
              <property name="Output List.[02]" value="Expr1003" />
              <property name="Output List.[02].Column" value="Expr1003" />
              <property name="Output List.[02].DataType" value="Int32" />
              <property name="Output List.[03]" value="Expr1004" />
              <property name="Output List.[03].Column" value="Expr1004" />
              <property name="Output List.[03].DataType" value="Int32" />
              <property name="Output List.[04]" value="Expr1005" />
              <property name="Output List.[04].Column" value="Expr1005" />
              <property name="Output List.[04].DataType" value="String" />
              <property name="Output List.[05]" value="Expr1006" />
              <property name="Output List.[05].Column" value="Expr1006" />
              <property name="Output List.[05].DataType" value="Int32" />
              <property name="Output List.[06]" value="Expr1007" />
              <property name="Output List.[06].Column" value="Expr1007" />
              <property name="Output List.[06].DataType" value="Int32" />
              <property name="Output List.[07]" value="Expr1008" />
              <property name="Output List.[07].Column" value="Expr1008" />
              <property name="Output List.[07].DataType" value="Int32" />
              <property name="Output List.[08]" value="Expr1009" />
              <property name="Output List.[08].Column" value="Expr1009" />
              <property name="Output List.[08].DataType" value="Double" />
              <property name="Output List.[09]" value="Expr1010" />
              <property name="Output List.[09].Column" value="Expr1010" />
              <property name="Output List.[09].DataType" value="Decimal" />
              <property name="Statistics.Open Count" value="1" />
              <property name="Statistics.Row Count" value="1" />
              <property name="Statistics.Average Row Count" value="1" />
              <property name="Defined Values.[00]" value="Expr1001 = COUNT(o.OrderID)" />
              <property name="Defined Values.[00].Target" value="Expr1001" />
              <property name="Defined Values.[00].DataType" value="Int32" />
              <property name="Defined Values.[00].Source" value="COUNT(o.OrderID)" />
              <property name="Defined Values.[01]" value="Expr1002 = AVG(o.OrderID)" />
              <property name="Defined Values.[01].Target" value="Expr1002" />
              <property name="Defined Values.[01].DataType" value="Int32" />
              <property name="Defined Values.[01].Source" value="AVG(o.OrderID)" />
              <property name="Defined Values.[02]" value="Expr1003 = FIRST(o.OrderID)" />
              <property name="Defined Values.[02].Target" value="Expr1003" />
              <property name="Defined Values.[02].DataType" value="Int32" />
              <property name="Defined Values.[02].Source" value="FIRST(o.OrderID)" />
              <property name="Defined Values.[03]" value="Expr1004 = LAST(o.OrderID)" />
              <property name="Defined Values.[03].Target" value="Expr1004" />
              <property name="Defined Values.[03].DataType" value="Int32" />
              <property name="Defined Values.[03].Source" value="LAST(o.OrderID)" />
              <property name="Defined Values.[04]" value="Expr1005 = CONCAT(o.OrderID)" />
              <property name="Defined Values.[04].Target" value="Expr1005" />
              <property name="Defined Values.[04].DataType" value="String" />
              <property name="Defined Values.[04].Source" value="CONCAT(o.OrderID)" />
              <property name="Defined Values.[05]" value="Expr1006 = MAX(o.OrderID)" />
              <property name="Defined Values.[05].Target" value="Expr1006" />
              <property name="Defined Values.[05].DataType" value="Int32" />
              <property name="Defined Values.[05].Source" value="MAX(o.OrderID)" />
              <property name="Defined Values.[06]" value="Expr1007 = MIN(o.OrderID)" />
              <property name="Defined Values.[06].Target" value="Expr1007" />
              <property name="Defined Values.[06].DataType" value="Int32" />
              <property name="Defined Values.[06].Source" value="MIN(o.OrderID)" />
              <property name="Defined Values.[07]" value="Expr1008 = SUM(o.OrderID)" />
              <property name="Defined Values.[07].Target" value="Expr1008" />
              <property name="Defined Values.[07].DataType" value="Int32" />
              <property name="Defined Values.[07].Source" value="SUM(o.OrderID)" />
              <property name="Defined Values.[08]" value="Expr1009 = STDEV(o.OrderID)" />
              <property name="Defined Values.[08].Target" value="Expr1009" />
              <property name="Defined Values.[08].DataType" value="Double" />
              <property name="Defined Values.[08].Source" value="STDEV(o.OrderID)" />
              <property name="Defined Values.[09]" value="Expr1010 = VAR(o.OrderID)" />
              <property name="Defined Values.[09].Target" value="Expr1010" />
              <property name="Defined Values.[09].DataType" value="Decimal" />
              <property name="Defined Values.[09].Source" value="VAR(o.OrderID)" />
            </properties>
            <input>
              <element operator="TableScan">
                <properties>
                  <property name="Table" value="Orders AS o" />
                  <property name="Output List.[0]" value="o.OrderID" />
                  <property name="Output List.[0].Table" value="o" />
                  <property name="Output List.[0].Column" value="OrderID" />
                  <property name="Output List.[0].DataType" value="Int32" />
                  <property name="Statistics.Open Count" value="1" />
                  <property name="Statistics.Row Count" value="830" />
                  <property name="Statistics.Average Row Count" value="830" />
                </properties>
                <input />
              </element>
            </input>
          </element>
        </input>
      </element>
    </executionPlan>
  </expectedPlan>
</test>